import request from '@/utils/request'

// 查询【收房合同】列表
export function listContract(query) {
  return request({
    url: '/houseClosing/contract/list',
    method: 'get',
    params: query
  })
}

// 选择合同查询列表
export function listquery(query) {
  return request({
    url: '/houseClosing/contract/querylist',
    method: 'get',
    data: query
  })
}



// 查询房源
export function listPosts(query) {
  return request({
    url: '/housings/info',
    method: 'get',
    params: query
  })
}

// 查询【业主】列表
export function listOwner(query) {
  return request({
    url: '/houseClosing/contract/ownerlist',
    method: 'get',
    params: query
  })
}


// 查询【请填写功能名称】详细
export function getContract(id) {
  return request({
    url: '/houseClosing/contract/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addContract(data) {
  return request({
    url: '/houseClosing/contract',
    method: 'post',
    data: data
  })
}
// 生成合同
export function shengcht(data) {
  return request({
    url: '/houseClosing/contract/scht',
    method: 'post',
    data: data
  })
}
export function upload(data) {
  return request({
    url: '/file/upload',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateContract(data) {
  return request({
    url: '/houseClosing/contract',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delContract(id) {
  return request({
    url: '/houseClosing/contract/' + id,
    method: 'delete'
  })
}

// 收房合同解约协议查询
export function saveContrat(data) {
  return request({
    url: '/houseClosing/contract/saveContrat',
    method: 'post',
    data: data
  })
}
export function printlist(data) {
  return request({
    url: '/houseClosing/contract/printlist',
    method: 'post',
    data: data
  })
}

export function wordList() {
  return request({
    url: '/houseClosing/contract/wordList',
    method: 'get'
  })
}
